package net.jwtools.tmt.domain;

public enum TerritoryType {
	RURAL(1), URBAN(2), FLAT(3), BUSINESS(4);

	private int value;

	TerritoryType(int value) {
		this.value = value;
	}

	// the identifierMethod
	public int toInt() {
		return value;
	}

	// the valueOfMethod
	public static TerritoryType fromInt(int value) {
		switch (value) {
		case 1:
			return RURAL;
		case 2:
			return URBAN;
		case 3:
			return FLAT;
		case 4:
			return BUSINESS;
		default:
			return null;
		}
	}

}
